package com.ddwl.search.controller;


import com.alibaba.fastjson.JSON;
import com.ddwl.common.controller.BaseController;
import com.ddwl.common.feign.api.DataApi;
import com.ddwl.schema.vo.base.RestVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api("产品服务")
@RequestMapping("product")
@RestController
public class ProductController extends BaseController {

    @Resource
    private DataApi dataApi;

    @GetMapping("/{activityId}/get")
    @ApiOperation("获取活动详情")
    public RestVo getById(@PathVariable String activityId) {
        return RestVo.ok();
    }


    @GetMapping("/today")
    public String today() {
        RestVo restVo =  dataApi.today();
        return JSON.toJSONString(restVo);
    }


}
